The depth of field (DOF) is an allowable distance range in front of and behind an object being shot in a case that it can be imaged clearly by the lens of a camera. In other words, when the lens of a camera focuses on an object, all the object points on the plane that is perpendicular to the optical axis of the lens (i.e., the object plane) can be imaged clearly on the receiver, and the points within a certain range in front of and behind the object plane can also be imaged relatively clearly. Such a range is referred to as the DOF of the camera. A larger DOF means that objects within a larger range can be imaged clearly. Therefore, control of DOF has a great practical significance in fields such as machine vision and video surveillance. FIG. 1 is a schematic view illustrating the DOF of a camera. As shown in FIG. 1, light emitted from an object at a nominal object distance is focused on a nominal image plane after passing through a lens. Light emitted from an object in front of or behind the nominal object distance will be focused in front of or behind the nominal image plane respectively after passing through the lens, and will produce a blur spot of a certain size on the nominal image plane. If the blur spot is small enough, the object can still be considered as having been imaged clearly. Therefore, objects between a near object distance and a far object distance in FIG. 1 can all be considered as having been imaged clearly. The axial distance between the near object distance and the far object distance is the DOF of the lens.
When the camera is shooting, the image of an object being shot may be blurred if parts of the object have different object distances and the variations thereof exceed the DOF of the camera. Or, in some scenarios (for example, intelligent transportation) where the camera has to be mounted in a tilted way with respect to the scene being monitored, since the scene targeted by the camera contains an object that is near and an object that is far, it may be impossible to focus on both clearly, i.e., it is impossible to guarantee that both objects are within the DOF of the camera, thus resulting in the image having a low definition.
Generally, there are 4 main factors affecting the DOF:
1) aperture of the lens: the smaller the aperture (i.e., the larger the aperture value (F#)), the larger the DOF;
2) focal length of the lens: the longer the focal length, the smaller the DOF; the shorter the focal length, the larger the DOF;
3) shooting distance: the longer the shooting distance, the larger the DOF; the shorter the shooting distance, the smaller the DOF;
4) pixel size of the photosensitive element: the larger the pixel size, the larger the DOF.
Generally, there is not much room for adjustment of the last three parameters once a camera is selected and the scene to be shot is determined. What can typically be changed is the aperture of a lens. Because of this reason, the aperture is reduced as much as possible under many imaging conditions requiring a larger DOF. But there are two problems with reducing the aperture. One is that light energy entering a photosensitive element decreases with the square of the aperture size decreasing, thus the image will become very dark when an aperture is too small; the other is that, if the aperture is small enough, light diffraction will become significant, thus image points that are originally imaged clearly will gradually become a larger blur spot, resulting in reduced definition of the image.
In relevant art, one approach is to increase the DOF of a camera by liquid lens focusing. Its principle lies in that the focal length of a liquid lens can be dynamically adjusted by a DC voltage. As the driving voltage changes, the focal point of the lens can move back and forth accordingly, so that the object on which the lens focuses can be controlled by voltage signals. The focusing manner is similar to that of human eyes, having the advantages of rapid response and long useful life, and the shortcomings of the lens being expensive and not suitable for wide-spread application. In addition, although a liquid lens zooms rapidly, it cannot recognize objects at different distances simultaneously during the shooting of the same image. Its scope of application is limited to some extent.
Another approach is to process image by deconvolution. The blurring of an image due to defocusing can be regarded, from the perspective of signal processing, as the result of a convolution operation of the point spread function of the defocused lens with the input image. As the point spread function of the defocused lens has a relatively simple mathematic model, it can be estimated and modelled in advance, and the input image can be restored by using the Wiener filtering method. Clear images for different object distances can be restored by using different deconvolution kernels after shooting a defocused image. This approach has the advantages of widely adaptability without the need for additional optical elements, and being able to obtain clear images for different object distances with one single image. However, the disadvantages are also obvious. First, the amount of computation of deconvolution is very large and needs to consume a large amount of computing resources, resulting in an increase in hardware cost. In addition, during the process of obtaining the deconvolution result, the noise in the image will also be amplified, resulting in a serious degradation of the image quality.
No effective solution has been proposed yet to solve the technical problem of a lens in relevant art having a relatively small DOF.